//
//  YYMyOrderVC.m
//  drivingSchool
//
//  Created by 子yu 刘 on 2018/8/13.
//  Copyright © 2018年 子yu 刘. All rights reserved.
//

#import "YYMyOrderVC.h"
#import "YYDriverOrderVC.h"
#import "YYCheckCarVC.h"
#import "YYGiftOrderVC.h"

@interface YYMyOrderVC ()

@end

@implementation YYMyOrderVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"我的订单";
}


- (instancetype)init {
    if (self = [super init]) {
        self.menuViewStyle = WMMenuViewStyleLine;
        self.titleColorNormal = DEF_COLOR_TEXT;
        self.titleColorSelected = DEF_COLOR_TEXT1;
        self.progressColor = DEF_COLOR_MAIN;
        self.progressHeight = 1;
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super initWithCoder:aDecoder];
    if (self) {
        self.menuViewStyle = WMMenuViewStyleLine;
        self.titleColorNormal = DEF_COLOR_MAIN1;
        self.titleColorSelected = DEF_COLOR_MAIN1;
        self.progressColor = DEF_COLOR_MAIN;
        self.progressHeight = 1;
    }
    return self;
}

- (NSInteger)numbersOfChildControllersInPageController:(WMPageController *)pageController{
    return 3;
}

- (NSString *)pageController:(WMPageController *)pageController titleAtIndex:(NSInteger)index{
    if (index == 0) {
        return @"礼包";
    }else if (index == 1) {
        return @"学车";
    }else if (index == 2){
        return @"检车";
    }
    return @"";
}

-(UIViewController *)pageController:(WMPageController *)pageController viewControllerAtIndex:(NSInteger)index{
    YYDriverOrderVC * driver = (YYDriverOrderVC *)[CFUtility getVC:@"YYDriverOrderVC" Storyboard:MINE];
     YYCheckCarVC * check = (YYCheckCarVC *)[CFUtility getVC:@"YYCheckCarVC" Storyboard:MINE];
    YYGiftOrderVC * gift = (YYGiftOrderVC *)[CFUtility getVC:@"YYGiftOrderVC" Storyboard:MINE];
    if (index == 0) {
        return gift;
    }else if (index == 1){
        return driver;
    }else if (index == 2){
        return check;
    }
    return nil;

}

- (CGRect)pageController:(WMPageController *)pageController preferredFrameForContentView:(WMScrollView *)contentView {
    return CGRectMake(0, 48, DEF_SCREEN_WIDTH(), DEF_SCREEN_HEIGHT()-DEF_NAV_HEIGHT()-DEF_TABBAR_HEIGHT()-48);
}

- (CGRect)pageController:(WMPageController *)pageController preferredFrameForMenuView:(WMMenuView *)menuView{
   // menuView.backgroundColor = DEF_COLOR_HOMEBGCOLOR;
    return CGRectMake(0, 0, DEF_SCREEN_WIDTH(), 48);
}


@end
